/*
 * Copyright© 2003-2019 浙江汇信科技有限公司, All Rights Reserved.
 */
package com.icinfo.cloud.provider.punish.config.controller;

import com.icinfo.cloud.provider.common.constant.Constant;
import com.icinfo.cloud.provider.punish.config.dto.ConfigElectricArchiveMainQueryDto;
import com.icinfo.cloud.provider.punish.config.model.ConfigElectricArchiveMain;
import com.icinfo.cloud.provider.punish.config.service.IConfigElectricArchiveMainService;
import com.icinfo.framework.common.web.Result;
import com.icinfo.framework.core.web.BaseController;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 描述: 电子卷宗配置信息 config_electric_archive_main 对应的Controller类.<br>
 *
 * @author framework generator
 * @date 2022年12月08日
 */
@RestController
@RequestMapping("/punish/config/electricArchive")
@Slf4j
public class ConfigElectricArchiveMainController extends BaseController {
    /**
     * 日志记录器
     */
    private static final Logger logger = LoggerFactory.getLogger(ConfigElectricArchiveMainController.class);

    @Autowired
    private IConfigElectricArchiveMainService configElectricArchiveMainService;
    /**
     * 【V1.9.4】描述：查询电子卷宗配置信息列表
     *
     * @return {@link Result < List <ConfigDeptParamKeyInfoVo>>} 已配置的部门关键信息列表
     * @author xiangyuyu
     * @date 2022-05-16 16:16
     */
    @PostMapping("/getElectricArchiveMainList")
    @ApiOperation(value = "【V2.0.0】描述：查询电子卷宗配置信息列表", httpMethod = "POST")
    public Result<List<ConfigElectricArchiveMain>> getElectricArchiveMainList(@RequestBody @Validated ConfigElectricArchiveMainQueryDto queryDto) {
        List<ConfigElectricArchiveMain> list = configElectricArchiveMainService.getConfigElectricArchiveMainList(queryDto);
        return Result.success(Constant.STRING_GET_SUCCESS, list);
    }
}
